#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    button=new QPushButton(this);
    button->setText("关闭");
//    connect(button,&QPushButton::clicked,this,&Widget::close);
//    button->move(300,200);
    connect(this,&Widget::A,this,&Widget::change);
    emit A();
}

Widget::~Widget()
{
    delete ui;
}



void Widget::change()
{
    qDebug()<<"你好世界";
}

              void Widget::ChangeText()
              {
                  button->setText("按钮已经改变");
              }


              void Widget::on_pushButton_clicked()
              {
                  ui->pushButton->setText("按钮已经改变");
                  //->setText("按钮已经改变");
              }
